package com.atguigu.daijia.dispatch.client;

import com.atguigu.daijia.common.result.Result;
import com.atguigu.daijia.model.vo.dispatch.NewOrderTaskVo;
import com.atguigu.daijia.model.vo.order.NewOrderDataVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


@FeignClient(value = "service-dispatch")
public interface NewOrderFeignClient {

/**
 * 添加新订单任务
 * @param newOrderTaskVo
 * @return
 */
@PostMapping("/dispatch/newOrder/addAndStartTask")
    Result<Long>addAndStartTask(@RequestBody  NewOrderTaskVo newOrderTaskVo);
/**
 * 查询司机新订单数据
 * @param driverId
 * @return
 */
@GetMapping("/dispatch/newOrder/findNewOrederQueueData/{driverId}")
    Result<List<NewOrderDataVo>>findNewOrederQueueData(@PathVariable("driverId") Long driverId);
/**
 * 清除司机新订单数据
 * @param driverId
 * @return
 */
@GetMapping("/dispatch/newOrder/clearNewOrederQueueData/{driverId}")
    Result<Boolean>clearNewOrederQueueData(@PathVariable("driverId") Long driverId);






}